<?php
/**
 * Created by PhpStorm.
 * User: edmmss
 * Date: 2018/12/4
 * Time: 14:10
 */

namespace app\modules\facade;


class Facade
{
    private $_os;

    private $_bios;

    /**
     * Facade constructor.
     * @param OsInterface $os
     * @param BiosInterface $bios
     */
    public function __construct(OsInterface $os, BiosInterface $bios)
    {
        $this->_os = $os;
        $this->_bios = $bios;
    }

    /**
     * 构建基础输入输出系统执行启动方法
     *
     * @date   2018/12/4
     * @author edmmss
     */
    public function turnOn()
    {
        $this->_bios->execute();
    }

    /**
     * 构建系统关闭方法
     *
     * @date   2018/12/4
     * @author edmmss
     */
    public function turnOff()
    {
        $this->_os->halt();
        $this->_bios->powerDown();
    }
}